<?php
class Model_User extends Zend_Db_Table_Abstract{
	protected $_name="user";
	protected $_primary="user_id";
	public  $db;
	public function __construct(){
		parent::__construct();
		$this->db = Zend_Registry::get('db');
	}
	public function listall(){
		$sql=$this->db->query("select * from user");
		return $sql->fetchAll();
	}
	public function listall2(){
		$query=$this->db->select()
					->from('user');
		return $this->db->fetchAll($query);
	}
	public function listAllId(){
		$query=$this->db->select()
			->from('user', array("user_id"))
			->where("status = ?" ,1);
		return $this->db->fetchAll($query);
	}
}
?>